(function () {
  $(document).ready(function () {
    function loadJScript() {
      var script = document.createElement("script");
      script.type = "text/javascript";
      script.src =
        "http://api.map.baidu.com/api?type=webgl&v=1.0&ak=imHDVP5Z7cVuzUGv1BlK3FGebkKMN5gW&callback=baidumapinit";
      document.body.appendChild(script);
    }
    function baidumapinit() {
      var map = new BMap.Map("map-container"); // 创建Map实例
      var point = new BMap.Point(116.404, 39.915); // 创建点坐标
      map.centerAndZoom(point, 12);
      map.enableScrollWheelZoom(); // 启用滚轮放大缩小
      var marker = new BMap.Marker(point); // 创建标注
      map.addOverlay(marker); // 将标注添加到地图中
    }
    // loadJScript();
    baidumapinit();
  });
})();
